package com.syh.jn.scm.infrastructure.repository.model.system;

import com.syh.core.ddd.infrastructure.repository.model.SuperModel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "T_SYSTEM_PERMISSION_TYPE")
@EqualsAndHashCode(callSuper = true)
public class PermissionTypeModel extends SuperModel {
  /**
   * 所属权限的上级
   */
  @Column(name = "SUPER_ID", columnDefinition = "bigint COMMENT '所属权限的上级'")
  private Long superId;

  @Column(name = "PERMISSION_TYPE_NAME", columnDefinition = "varchar(50) COMMENT '权限级别名称'")
  private String permissionTypeName;
  /**
   * 父类目录    格式：1-11  1：父父类id，11：父类id
   */
  @Column(name = "CATALOG_CODE", columnDefinition = "varchar(50) COMMENT '父类目录'")
  private String catalogCode;
  /**
   * 排序
   */
  @Column(name = "ORDER_LEVEL", columnDefinition = "smallint COMMENT '排序'")
  private Short orderLevel;
  /**
   * 模块描述
   */
  @Column(name = "DESCRIPTION", columnDefinition = "varchar(500) COMMENT '模块描述'")
  private String description;
  /**
   * 所属终端系统:DOWNSTREAM,OPERATION,SUPPLIER,UPSTREAM
   */
  @Column(name = "TERMINAL_TYPE", columnDefinition = "varchar(50) COMMENT '所属终端'")
  private String terminalType;

	@Column(name = "DEL", columnDefinition = "smallint COMMENT '是否删除 1 否 -1 是 '")
	private Short del;
}
